package com.neu.tlias.controller;


import com.neu.tlias.pojo.Emp;
import com.neu.tlias.pojo.Result;
import com.neu.tlias.service.IEmpService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

@Api(tags = "用户注册管理接口")
@Slf4j
@RestController
@RequiredArgsConstructor
public class RegisterController {
    private final IEmpService empService;

    @ApiOperation("注册员工接口")
    @PostMapping("/register")
    public Result save(@RequestBody Emp emp){
        log.info("新增员工:{}",emp);
        empService.save(emp);
        return Result.success();
    }
}
